<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 18-7-31
 * Time: 上午9:40
 */

/* @var $this yii\web\View */

/**
 * @var \admin\modules\rbac\forms\RoleMenu $model
 */
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

$this->title = Yii::t('app', '分配菜单');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="rbac-user-allot-role">
    <div class="row">
        <div class="col-sm-12">
            <?php $form = ActiveForm::begin(); ?>
            <?=$form->field($model, 'role_id')->hiddenInput()->label(false) ?>
            <?=\common\members\wodrow\widgets\group_checkbox\GroupCheckBox::widget([
                'model' => $model,
                'attribute' => 'role_menus',
                'show_attribute' => 'menus',
            ]) ?>
            <div class="form-group">
                <?= Html::submitButton(Yii::t('app', 'Save'), ['class' => 'btn btn-success']) ?>
                <?= Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-warning']) ?>
            </div>
            <?php ActiveForm::end(); ?>
        </div>
    </div>
</div>
